package kr.pe.johnkim.chattingday.mobile.rest.service;

import kr.pe.johnkim.chattingday.mobile.domain.ChattingDayPrivateJoiner;
import kr.pe.johnkim.chattingday.mobile.rest.dao.ChattingDayPrivateJoinerDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Chatting Day 쪽지 사용자 관련 Service 메소드들을 구현하는 클래스 이다.
 * 
 * @author : johnkim <cale9797@gmail.com / Bettersoft Inc,.>
 * @Date : 12. 6. 12
 */
public class ChattingDayPrivateJoinerServiceImpl implements ChattingDayPrivateJoinerService {

    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(ChattingDayPrivateJoinerServiceImpl.class);

    @Autowired
    private ChattingDayPrivateJoinerDao chattingDayPrivateJoinerDao = null;

    /**
     * 쪽지 사용자를 등록 한다.
     *
     * @return
     */
    @Override
    public boolean registerPrivateJoiner(ChattingDayPrivateJoiner chattingDayPrivateJoiner) {
        logger.info("registerPrivateJoiner");

        return chattingDayPrivateJoinerDao.registerPrivateJoiner(chattingDayPrivateJoiner);
    }

    /**
     * 쪽지 사용자를 비활성화 한다.
     *
     * @param chattingDayPrivateJoiner
     * @return
     */
    @Override
    public boolean updateDeactivatePrivateJoiner(ChattingDayPrivateJoiner chattingDayPrivateJoiner) {
        logger.info("updateDeactivatePrivateJoiner");

        return chattingDayPrivateJoinerDao.updateDeactivatePrivateJoiner(chattingDayPrivateJoiner);
    }

    /**
     * 쪽지함의 모든 사용자를 비활성화 한다.
     *
     * @param chattingDayPrivateJoiner
     * @return
     */
    @Override
    public boolean updateDeactivatePrivateAllJoiner(ChattingDayPrivateJoiner chattingDayPrivateJoiner) {
        logger.info("updateDeactivatePrivateAllJoiner");

        return chattingDayPrivateJoinerDao.updateDeactivatePrivateAllJoiner(chattingDayPrivateJoiner);
    }
}
